home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
003
/
chrchpr4.arc
/
MGFCROST.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
4KB
|
136 lines
* Program MGFCROST - Generates file FCMEMBRS for full-church rosters, mailings
Store d+':MEMBERS' to M1FILE
Use &M1FILE
? 'Now indexing MEMBERS file to produce an index by family code.'
Store d+':MEMBFCR' to M2FILE
Set talk on
Index on familycode to &M2FILE
Set talk off
? 'MEMBERS file indexing complete. Now generating FCMEMBRS file.'
Select secondary
Use FCMEMBRX
Store d+':FCMEMBRS' to MFILE
Copy to &MFILE
Use &MFILE
Select primary
Use &M1FILE index &M2FILE
Do while (* .or. $(MEMBSTATUS,2,1) = '*') .and. .not. EOF
SKIP
ENDDO
Store $(familycode,1,7) to prevfam
Store 0 to recc
Store 0 to recnumb
Store ' ' to xbirthd
Do while .not. EOF
If recc=20
Store recnumb+20 to recnumb
? recnumb,' RECORDS PROCESSED'
Store 0 to recc
endif
Store T to FAMHEAD
Do while $(familycode,1,7) = prevfam .and. .not. EOF
If FAMHEAD
Store trim(last:name) to lastname
Store trim(first:name) to fnames
Store F to FAMHEAD
Store ' ' to KIDS
Store trim(ADDRESS) to XADDR
Store trim(city:state)+' ' to citystate
Store zip to xzip
STORE ZONE TO XZONE
STORE $(birthdate,1,8) to xbirthd
Store membstatus to xmemb
Store ss:sc:memb to xsssc
Store home:phone to xhphone
Store work:phone to xwphone
Store spec:dates to xspd
Store 0 to childcnt
else
If $(familycode,8,1) = '2'
Store fnames+' and '+trim(first:name) to fnames
*Save the woman's work phone is there is no man's
Store xbirthd+' '+$(birthdate,1,8) to xbirthd
If xwphone = ' ' .and. work:phone <> ' '
Store work:phone to xwphone
endif
* If either husband or wife are members, make them members together.
If $(membstatus,1,1) <> $(xmemb,1,1)
If $(membstatus,1,1) = 'Y'
Store membstatus to xmemb
endif
endif
else
Store kids+trim(first:name)+', ' to kids
endif
endif
Store $(familycode,8,1) to xfam
SKIP
Store F to active
Do while (* .or. $(membstatus,2,1) = '*') .and. .not. EOF
SKIP
enddo
ENDDO
Store recc+1 to recc
Select secondary
Append blank
replace familycode with prevfam
replace last:name with lastname
replace first:name with fnames
replace home:phone with xhphone
replace work:phone with xwphone
If XFAM = '3' .or. XFAM = '4'
Store len(kids) to lenkids
Store $(kids,1,lenkids-2) to kids
endif
replace children with kids
replace address with xaddr
replace city:state with citystate
replace zip with xzip
replace zone with xzone
replace spec:dates with xspd
replace membstatus with XMEMB
replace ss:sc:memb with xsssc
replace birthdate with xbirthd
Select primary
Store $(familycode,1,7) to prevfam
Store ' ' to xwphone
enddo
Select secondary
USE
Store recnumb+recc to recnumb
? recnumb,' RECORDS PROCESSED'
Select primary
USE &MFILE
Set talk on
? 'Now indexing FCMEMBRS file by last-name, first-name, creating FCMEMBRS.NDX'
Index on last:name+first:name to &MFILE
Set talk off
? 'FCMEMBRS index is complete.'
? 'Now indexing FCMEMBRS by SS:SC:MEMB, then last/first names,--> FCRSCNDX.NDX'
USE &MFILE
Store d+':fcrscndx' to M3FILE
Set talk on
Index on SS:SC:MEMB+last:name+first:name to &M3FILE
Set talk off
USE
? 'FCRSCNDX index is complete. Full Church file FCMEMBRS is now created.'
RELEASE prevfam,lastname,fnames,xhphone,xwphone,famhead,xsssc,xbirthd,kids,;
xaddr,citystate,xzip,xmemb,xfam,lenkids,recc,recnumb,M2FILE,M3FILE,childcnt,;
active,M1FILE
RETURN
tore d+':MEMBERS' to M1FILE
Use &M1FILE
? 'Now indexing MEMBERS file to produce an index by family code.'
Store d+':MEMBFCR' to M2FILE
Set talk on
Index on familycode to &M2FILE
Set talk off
? 'MEMBERS file indexing complete. Now generating FCMEMBRS file.'
Select secondary
Use FCMEMBRX
Store d+':FCMEMBRS' to MFILE
Copy to &MFILE
Use &MFILE
Select primary
Use &M1FILE index &M2FILE
Do while (* .or. $(MEMBSTATUS,2,